gdk/wayland: Mark matched settings from the portal as valid
authorCarlos Garnacho <carlosg@gnome.org>
Thu, 14 Jan 2021 14:47:36 +0000 (15:47 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Thu, 14 Jan 2021 14:57:29 +0000 (15:57 +0100)
commit97b5fad13159d19ccc2c3b9d222f99f100cc0043
treef08fac42a82c787d5c0b83a5f5f5458bdd812f46
parent285a91715d2e7c0a0814bbdb8cad6ca5c4a205b8
gdk/wayland: Mark matched settings from the portal as valid

Commit e6209de9625 added some checks on TranslationEntry.valid in
order to figure out whether using the new font settings or the
old g-s-d ones. However that's only set in the non-sandboxed case.

This makes sandboxed applications fallback to the old (and also
non-existing with modern g-s-d) settings, possibly resulting in
ugly defaults being picked.

Fix this by also marking TranslationEntry elements as valid when
using the settings portal, precisely those entries that we are able
to read and match with our own table.
gdk/wayland/gdkdisplay-wayland.c